Switch zstandard library to stdlib compression.zstd or backports.zstd#198
Switch zstandard library to stdlib compression.zstd or backports.zstd#198
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #198 +/- ##
==========================================
- Coverage 83.42% 83.27% -0.15%
==========================================
Files 35 35
Lines 3699 3696 -3
==========================================
- Hits 3086 3078 -8
- Misses 613 618 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR migrates from the third-party zstandard library to the stdlib compression.zstd (Python 3.14+) or its backport backports.zstd (Python <3.14). The changes simplify the API calls and remove the PyPy restriction for zstd compression support.
- Replaces
zstandardwith conditional import ofcompression.zstd(Python ≥3.14) orbackports.zstd(Python <3.14) - Updates zstd API usage from separate compressor/decompressor contexts to unified
ZstdFileinterface - Removes PyPy restriction for zstd compression support
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pyproject.toml | Updates dependency from zstandard to backports.zstd with Python version constraint |
| flow/record/base.py | Implements conditional import logic and updates API usage from context-based compression to ZstdFile |
| tests/record/test_adapter.py | Updates skip message and removes PyPy restriction test skip |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes #197
supersedes #196